package com.ophiux.order.model.dto;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("商品订单记录表  --  返回实体")
public class ProductOrderDTO {

	@ApiModelProperty("商品订单id")
	private Integer id;

	@ApiModelProperty("商品类型  1时间商品、2样式商品、3实体商品")
	private String productType;

	@ApiModelProperty("会员id")
	private Integer memberId;

	@ApiModelProperty("购买商品订单 ID")
	private Integer productId;

	@ApiModelProperty("关联商品版本号")
	private Integer productVersion;

	@ApiModelProperty("购买数量")
	private Integer quantity;

	@ApiModelProperty("微信支付订单号")
	private Integer orderNo;

	@ApiModelProperty("支付金额")
	private BigDecimal payAmount;

	@ApiModelProperty("支付状态  0待支付  1已支付  2已退款")
	private Integer status;

	@ApiModelProperty("退款单号")
	private String refundNo;

	@ApiModelProperty("交易时间")
	private LocalDateTime tradeTime;

	@ApiModelProperty("购买订单创建者   会员本人, 管理员")
	private String orderCreator;

	@ApiModelProperty("创建者id    管理员 ID，或者本人 ID（此时可为空，创建者类型已标识为本人）")
	private Integer creatorId;

	@ApiModelProperty("发货地址（实体名片订单特有）")
	private String shippingAddress;

	@ApiModelProperty("发货单号（实体名片订单特有）")
	private String shipmentNo;

	@ApiModelProperty("快递公司（实体名片订单特有）")
	private String expressCompany;

	@ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime createdAt;

	@ApiModelProperty(value = "节点启动时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime updatedAt;

}
